<html>
<head>
    <title>Element.js Source Code | Sencha Test 1.0.3</title>
    <!--  Generated on  -->
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="css/styles.css">
</head>
<body>
    <pre class="editor editor-colors"><div class="line"><a name="line1"><span class="source js"><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></div><div class="line"><a name="line2"><span class="source js"><span class="comment block documentation js"><span>&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@class</span></span><span>&nbsp;ST.Element</span></span></span></div><div class="line"><a name="line3"><a name="ST.Element"><span class="source js"><span class="comment block documentation js"><span>&nbsp;*&nbsp;This&nbsp;class&nbsp;wraps&nbsp;a&nbsp;DOM&nbsp;element&nbsp;and&nbsp;provides&nbsp;helpful&nbsp;methods&nbsp;that&nbsp;simplify&nbsp;and&nbsp;normalize</span></span></span></div><div class="line"><a name="line4"><span class="source js"><span class="comment block documentation js"><span>&nbsp;*&nbsp;browser&nbsp;differences.</span></span></span></div><div class="line"><a name="line5"><span class="source js"><span class="comment block documentation js"><span>&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></div><div class="line"><a name="line6"><span class="source js"><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Element</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>define</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="meta function js"><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>Element</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line7"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;doc&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class js"><span>document</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line8"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;docEl&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>doc</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>documentElement</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line9"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;body&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>doc</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>body</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line10"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;propertyCache&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="punctuation section scope begin js"><span>{</span></span><span class="punctuation section scope end js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line11"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;spaceRe&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span class="string regexp js"><span>&nbsp;</span><span class="punctuation definition string begin js"><span>/</span></span><span class="constant other character-class set regexp"><span class="punctuation definition character-class regexp"><span>[</span></span><span>&nbsp;</span><span class="punctuation definition character-class regexp"><span>]</span></span></span><span class="keyword operator quantifier regexp"><span>+</span></span><span class="punctuation definition string end js"><span>/</span></span><span>g</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line12"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;camelRe&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span class="string regexp js"><span>&nbsp;</span><span class="punctuation definition string begin js"><span>/</span></span><span class="meta group regexp"><span class="punctuation definition group regexp"><span>(</span></span><span>-</span><span class="constant other character-class set regexp"><span class="punctuation definition character-class regexp"><span>[</span></span><span class="constant other character-class range regexp"><span>a-z</span></span><span class="punctuation definition character-class regexp"><span>]</span></span></span><span class="punctuation definition group regexp"><span>)</span></span></span><span class="punctuation definition string end js"><span>/</span></span><span>gi</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line13"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function js"><span class="entity name function js"><span>camelReplaceFn</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>m</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>a</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line14"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="variable other object js"><span>a</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>charAt</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="constant numeric decimal js"><span>1</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>toUpperCase</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line15"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line16"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inputTags&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line17"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INPUT</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line18"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TEXTAREA</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span></span></span></span></div><div class="line"><a name="line19"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line20"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;Input&nbsp;types&nbsp;that&nbsp;cannot&nbsp;be&nbsp;typed&nbsp;into</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line21"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nonEditableInputTypes&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line22"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;button</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line23"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;checkbox</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line24"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hidden</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line25"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line26"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;radio</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line27"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reset</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line28"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;submit</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span></span></span></span></div><div class="line"><a name="line29"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line30"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line31"><a name="ST.Element-static-method-normalize"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line32"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Normalizes&nbsp;CSS&nbsp;property&nbsp;keys&nbsp;from&nbsp;dash&nbsp;delimited&nbsp;to&nbsp;camel&nbsp;case&nbsp;JavaScript&nbsp;Syntax.</span></span></span></span></span></div><div class="line"><a name="line33"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;For&nbsp;example:</span></span></span></span></span></div><div class="line"><a name="line34"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line35"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;border-width&nbsp;-&gt;&nbsp;borderWidth</span></span></span></span></span></div><div class="line"><a name="line36"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;-&nbsp;padding-top&nbsp;-&gt;&nbsp;paddingTop</span></span></span></span></span></div><div class="line"><a name="line37"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line38"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@method</span></span><span>&nbsp;normalize</span></span></span></span></span></div><div class="line"><a name="line39"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@static</span></span></span></span></span></span></div><div class="line"><a name="line40"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@private</span></span></span></span></span></span></div><div class="line"><a name="line41"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;</span><span class="other meta jsdoc"><span class="entity name type instance jsdoc"><span>{String}</span></span><span>&nbsp;</span><span class="variable other jsdoc"><span>prop</span></span><span>&nbsp;</span><span class="other description jsdoc"><span>The&nbsp;property&nbsp;to&nbsp;normalize</span></span></span></span></span></span></span></div><div class="line"><a name="line42"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;</span><span class="other meta jsdoc"><span class="entity name type instance jsdoc"><span>{String}</span></span><span>&nbsp;</span><span class="variable other jsdoc"><span>The</span></span><span>&nbsp;</span><span class="other description jsdoc"><span>normalized&nbsp;string</span></span></span></span></span></span></span></div><div class="line"><a name="line43"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line44"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function js"><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="entity name function js"><span>normalize</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>prop</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line45"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;propertyCache</span><span class="meta brace square js"><span>[</span></span><span>prop</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>propertyCache</span><span class="meta brace square js"><span>[</span></span><span>prop</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>prop</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>replace</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>camelRe</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;camelReplaceFn</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta brace round js"><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line46"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line47"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line48"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line49"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isElement</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant language boolean true js"><span>true</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line50"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line51"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>constructor</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>element</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line52"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;element</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line53"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line54"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line55"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>contains</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>el</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line56"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line57"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;child&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>el</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;el</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line58"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line59"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>contains</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line60"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>contains</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>child</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line61"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line62"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line63"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>for</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;child</span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;child&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>child</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>parentNode</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line64"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>child&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;dom</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line65"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language boolean true js"><span>true</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line66"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line67"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line68"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line69"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language boolean false js"><span>false</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line70"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line71"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line72"><a name="ST.Element-method-focus"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line73"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Try&nbsp;to&nbsp;focus&nbsp;the&nbsp;element.</span></span></span></span></span></div><div class="line"><a name="line74"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line75"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{ST.Element}&nbsp;this</span></span></span></span></span></div><div class="line"><a name="line76"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line77"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>focus</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line78"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line79"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line80"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>dom</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line81"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function dom js"><span>focus</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line82"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line83"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line84"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line85"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line86"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line87"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>getBox</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line88"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;round&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class math js"><span>Math</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>round</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line89"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line90"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;box</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;scroll</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;x</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;y</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;w</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;h</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line91"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line92"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>dom&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;doc&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;body</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line93"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;IE&nbsp;(including&nbsp;IE10)&nbsp;throws&nbsp;an&nbsp;error&nbsp;when&nbsp;getBoundingClientRect</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line94"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;is&nbsp;called&nbsp;on&nbsp;an&nbsp;element&nbsp;not&nbsp;attached&nbsp;to&nbsp;dom</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line95"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>try</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line96"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;box&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getBoundingClientRect</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line97"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>catch</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>ex</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line98"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;box&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span><span>&nbsp;left</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;top</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;width</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;height</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line99"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line100"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line101"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta function-call js"><span class="entity name function js"><span>round</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="variable other object js"><span>box</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>left</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line102"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta function-call js"><span class="entity name function js"><span>round</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="variable other object js"><span>box</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>top</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line103"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;w&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>box</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>width</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line104"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;h&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>box</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>height</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line105"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line106"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scroll&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta class instance constructor"><span class="keyword operator new js"><span>new</span></span><span>&nbsp;</span><span class="entity name type instance js"><span>ST.Element</span></span></span><span class="meta brace round js"><span>(</span></span><span>doc</span><span class="meta brace round js"><span>)</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getScroll</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line107"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line108"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;</span><span class="keyword operator assignment compound js"><span>+=</span></span><span>&nbsp;</span><span class="variable other object js"><span>scroll</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>x</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line109"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y&nbsp;</span><span class="keyword operator assignment compound js"><span>+=</span></span><span>&nbsp;</span><span class="variable other object js"><span>scroll</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>y</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line110"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line111"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;y&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;w&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;h&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line112"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line113"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line114"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span><span>&nbsp;x</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;x</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;y</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;y</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;w</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;w</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;h</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;h&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line115"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line116"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line117"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>getXY</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line118"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;box&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getBox</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line119"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line120"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="meta brace square js"><span>[</span></span><span>&nbsp;</span><span class="variable other object js"><span>box</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>x</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable other object js"><span>box</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>y</span></span><span>&nbsp;</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line121"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line122"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line123"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>getStyle</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>prop</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line124"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line125"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;view&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>ownerDocument</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>defaultView</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line126"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;style</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line127"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line128"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>view&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="variable other object js"><span>view</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>getComputedStyle</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line129"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;style&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>view</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getComputedStyle</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>dom</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line130"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line131"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;style&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>currentStyle</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line132"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line133"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line134"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>style&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>style</span></span><span class="meta brace round js"><span>)</span></span><span class="meta brace square js"><span>[</span></span><span class="meta function-call js"><span class="entity name function js"><span>normalize</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>prop</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line135"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line136"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line137"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>getScroll</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line138"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;me&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line139"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scroller&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getScroller</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line140"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line141"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pos</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line142"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line143"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>scroller</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line144"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pos&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>scroller</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getPosition</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line145"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line146"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>dom&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;doc&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;docEl&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator comparison js"><span>==</span></span><span>&nbsp;body</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line147"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>self</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getViewportScrollElement</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line148"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line149"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line150"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pos&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line151"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>scrollLeft</span></span><span>&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line152"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>scrollTop</span></span><span>&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span></span></span></span></div><div class="line"><a name="line153"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line154"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line155"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line156"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;pos</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line157"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line158"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line159"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>scrollTo</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>x</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>y</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line160"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;me&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line161"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scroller&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getScroller</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line162"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line163"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line164"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>scroller</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line165"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>scroller</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>scrollTo</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>x</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;y</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line166"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line167"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>dom&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;doc&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;docEl&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator comparison js"><span>==</span></span><span>&nbsp;body</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line168"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>self</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getViewportScrollElement</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line169"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line170"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line171"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>dom</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line172"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>scrollLeft</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;x</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line173"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>scrollTop</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;y</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line174"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line175"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line176"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line177"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line178"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>getClassMap</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line179"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;me&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line180"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;className&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>className</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line181"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;classMap&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>_classMap</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line182"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line183"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span>classMap&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>_className</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;className</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line184"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>_className</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;className&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>className&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line185"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>_classMap</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;classMap&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>Array</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>toMap</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="variable other object js"><span>className</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>split</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>spaceRe</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line186"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword operator delete js"><span>delete</span></span><span>&nbsp;classMap</span><span class="meta brace square js"><span>[</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line187"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line188"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line189"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;classMap</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line190"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line191"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line192"><a name="ST.Element-method-getComponent"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line193"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;the&nbsp;`Ext.Component`&nbsp;associated&nbsp;with&nbsp;this&nbsp;element.</span></span></span></span></span></div><div class="line"><a name="line194"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line195"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{Ext.Component}</span></span></span></span></span></div><div class="line"><a name="line196"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line197"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>getComponent</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line198"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;Ext&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class js"><span>window</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Ext</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line199"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmp&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line200"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line201"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Comp</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;Mgr</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line202"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line203"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>Ext</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line204"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Comp&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>Ext</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>Component</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line205"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>Comp</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line206"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>Comp</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>fromElement</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span></span><span class="variable other object js"><span>Comp</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>fromElement</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>$emptyFn</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line207"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;5.1.1-5.1.x,&nbsp;6.0.1+&nbsp;(6.0.0&nbsp;has&nbsp;an&nbsp;emptyFn&nbsp;placeholder)</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line208"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmp&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>Comp</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>fromElement</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>dom</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line209"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>Comp</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>getComponentByElement</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line210"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;5.0.0,&nbsp;5.0.1</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line211"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>try</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line212"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmp&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>Comp</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getComponentByElement</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>dom</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line213"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>catch</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>e</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="punctuation section scope begin js"><span>{</span></span><span class="punctuation section scope end js"><span>}</span></span></span></span></span></div><div class="line"><a name="line214"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line215"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mgr&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>Ext</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>ComponentManager</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line216"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line217"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>Mgr</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line218"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>Mgr</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>byElement</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line219"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>5.1.0</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line220"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmp&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>Mgr</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>byElement</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>dom</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line221"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line222"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>Ext&nbsp;4.x,&nbsp;Sencha&nbsp;Touch&nbsp;2.x</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line223"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmp&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>$getComponentFromElement</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>dom</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line224"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line225"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line226"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line227"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line228"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line229"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line230"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;cmp</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line231"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line232"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line233"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$</span><span class="meta function json js"><span class="entity name function js"><span>getComponentFromElement</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>node</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>limit</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>selector</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line234"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;target&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>Ext</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getDom</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>node</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line235"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cache&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>Ext</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>ComponentManager</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>all</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line236"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;depth&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line237"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;topmost</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;cmpId</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;cmp</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line238"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line239"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>cache</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>map</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line240"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cache&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>cache</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>map</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line241"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line242"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line243"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator typeof js"><span>typeof</span></span><span>&nbsp;limit&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>number</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line244"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;topmost&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>Ext</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getDom</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>limit</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line245"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;limit&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class js"><span>Number</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>MAX_VALUE</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line246"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line247"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line248"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>cache</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line249"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>while</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>target&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="variable other object js"><span>target</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>nodeType</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;depth&nbsp;</span><span class="keyword operator comparison js"><span>&lt;</span></span><span>&nbsp;limit&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;target&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;topmost</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line250"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmpId&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>target</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function dom js"><span>getAttribute</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>data-componentid</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="variable other object js"><span>target</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>id</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line251"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line252"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>cmpId</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line253"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmp&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;cache</span><span class="meta brace square js"><span>[</span></span><span>cmpId</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line254"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line255"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>cmp&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span>selector&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="variable other object js"><span>Ext</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>ComponentQuery</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>is</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>cmp</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;selector</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta brace round js"><span>)</span><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line256"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;cmp</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line257"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line258"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line259"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;Increment&nbsp;depth&nbsp;on&nbsp;every&nbsp;*Component*&nbsp;found,&nbsp;not&nbsp;Element</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line260"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;depth</span><span class="keyword operator increment js"><span>++</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line261"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line262"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line263"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>target</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>parentNode</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line264"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line265"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line266"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line267"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line268"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line269"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line270"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>getScroller</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line271"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;cmp&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getComponent</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line272"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scroller&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line273"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scrollMgr</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line274"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line275"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>cmp</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line276"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scrollMgr&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>cmp</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>scrollManager</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line277"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>scrollMgr</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line278"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;5.0</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line279"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scroller&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>scrollMgr</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>scroller</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line280"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>cmp</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>getScrollable</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line281"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;5.1+</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line282"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scroller&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>cmp</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getScrollable</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line283"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line284"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line285"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line286"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;scroller</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line287"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line288"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line289"><a name="ST.Element-method-getText"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line290"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;the&nbsp;elements&nbsp;`textContent`.</span></span></span></span></span></div><div class="line"><a name="line291"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line292"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>getText</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line293"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line294"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line295"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>inputTags</span><span class="meta brace square js"><span>[</span></span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>tagName</span></span><span class="meta brace square js"><span>]</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line296"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>value</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line297"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line298"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line299"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;dom</span><span class="meta brace square js"><span>[</span></span><span class="constant other object js"><span>ST</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>isIE8</span></span><span>&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>innerText</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>textContent</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line300"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line301"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line302"><a name="ST.Element-method-hasAnyCls"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line303"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;`true`&nbsp;if&nbsp;this&nbsp;element&nbsp;has&nbsp;any&nbsp;of&nbsp;the&nbsp;classes&nbsp;in&nbsp;the&nbsp;given&nbsp;`cls`&nbsp;string</span></span></span></span></span></div><div class="line"><a name="line304"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;(of&nbsp;space-separated&nbsp;classes)&nbsp;or&nbsp;array&nbsp;of&nbsp;class&nbsp;names.&nbsp;Array&nbsp;elements&nbsp;are&nbsp;not</span></span></span></span></span></div><div class="line"><a name="line305"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;checked&nbsp;for&nbsp;space-separators.</span></span></span></span></span></div><div class="line"><a name="line306"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line307"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{String/String[]}&nbsp;cls&nbsp;The&nbsp;classes&nbsp;to&nbsp;test</span></span></span></span></span></div><div class="line"><a name="line308"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{Boolean}</span></span></span></span></span></div><div class="line"><a name="line309"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@method</span></span><span>&nbsp;hasAnyCls</span></span></span></span></span></div><div class="line"><a name="line310"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line311"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>hasAnyCls</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>cls</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line312"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>hasCls</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>cls</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="constant language boolean true js"><span>true</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line313"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line314"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line315"><a name="ST.Element-method-hasCls"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line316"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;`true`&nbsp;if&nbsp;this&nbsp;element&nbsp;has&nbsp;the&nbsp;classes&nbsp;in&nbsp;the&nbsp;given&nbsp;`cls`&nbsp;string&nbsp;(of</span></span></span></span></span></div><div class="line"><a name="line317"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;space-separated&nbsp;classes)&nbsp;or&nbsp;array&nbsp;of&nbsp;class&nbsp;names.&nbsp;Array&nbsp;elements&nbsp;are&nbsp;not</span></span></span></span></span></div><div class="line"><a name="line318"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;checked&nbsp;for&nbsp;space-separators.</span></span></span></span></span></div><div class="line"><a name="line319"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line320"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{String/String[]}&nbsp;cls&nbsp;The&nbsp;classes&nbsp;to&nbsp;test</span></span></span></span></span></div><div class="line"><a name="line321"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{Boolean}&nbsp;[any]&nbsp;Pass&nbsp;`true`&nbsp;to&nbsp;only&nbsp;require&nbsp;that&nbsp;one&nbsp;of&nbsp;the&nbsp;classes</span></span></span></span></span></div><div class="line"><a name="line322"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;must&nbsp;be&nbsp;present,&nbsp;`false`&nbsp;(the&nbsp;default)&nbsp;will&nbsp;require&nbsp;that&nbsp;all&nbsp;classes&nbsp;be&nbsp;present.</span></span></span></span></span></div><div class="line"><a name="line323"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{Boolean}</span></span></span></span></span></div><div class="line"><a name="line324"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@method</span></span><span>&nbsp;hasCls</span></span></span></span></span></div><div class="line"><a name="line325"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line326"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>hasCls</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>cls</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>any</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line327"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;classMap&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getClassMap</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line328"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;n</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line329"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line330"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator typeof js"><span>typeof</span></span><span>&nbsp;cls&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>string</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line331"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cls&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>cls</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>split</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>spaceRe</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line332"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line333"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line334"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>for</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>i&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;n&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;cls&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="variable other object js"><span>cls</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>length</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;i</span><span class="keyword operator decrement js"><span>--</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>&gt;</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line335"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>classMap</span><span class="meta brace square js"><span>[</span></span><span>cls</span><span class="meta brace square js"><span>[</span></span><span>i</span><span class="meta brace square js"><span>]</span><span>]</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line336"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>any</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line337"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language boolean true js"><span>true</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;&nbsp;</span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;one&nbsp;hit&nbsp;is&nbsp;good&nbsp;enough</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line338"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line339"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span>any</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line340"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language boolean false js"><span>false</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;&nbsp;&nbsp;</span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;one&nbsp;miss&nbsp;is&nbsp;good&nbsp;enough</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line341"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line342"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line343"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line344"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;If&nbsp;we&nbsp;get&nbsp;here&nbsp;and&nbsp;!any&nbsp;then&nbsp;we&nbsp;only&nbsp;found&nbsp;matches.&nbsp;If&nbsp;any,&nbsp;we&nbsp;may</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line345"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;not&nbsp;have&nbsp;found&nbsp;any&nbsp;matches&nbsp;if&nbsp;cls&nbsp;was&nbsp;empty.</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line346"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span></span><span>any&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span></span><span>n</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line347"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line348"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line349"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>isDetached</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line350"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;</span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;logic&nbsp;borrow&nbsp;from&nbsp;Ext.isGarbage</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line351"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line352"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;determines&nbsp;if&nbsp;the&nbsp;dom&nbsp;element&nbsp;is&nbsp;in&nbsp;the&nbsp;document&nbsp;or&nbsp;in&nbsp;the&nbsp;detached&nbsp;body&nbsp;element</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line353"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;use&nbsp;by&nbsp;collectGarbage&nbsp;and&nbsp;Ext.get()</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line354"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span></span></span></span></div><div class="line"><a name="line355"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;window,&nbsp;document,&nbsp;documentElement,&nbsp;and&nbsp;body&nbsp;can&nbsp;never&nbsp;be&nbsp;garbage.</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line356"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>nodeType</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>tagName</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>BODY</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>tagName</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>HTML</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span></span></span></span></div><div class="line"><a name="line357"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;if&nbsp;the&nbsp;element&nbsp;does&nbsp;not&nbsp;have&nbsp;a&nbsp;parent&nbsp;node,&nbsp;it&nbsp;is&nbsp;definitely&nbsp;not&nbsp;in&nbsp;the</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line358"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;DOM&nbsp;-&nbsp;we&nbsp;can&nbsp;exit&nbsp;immediately</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line359"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>parentNode</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span></span></span></span></div><div class="line"><a name="line360"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;If&nbsp;the&nbsp;element&nbsp;has&nbsp;an&nbsp;offset&nbsp;parent&nbsp;we&nbsp;can&nbsp;bail&nbsp;right&nbsp;away,&nbsp;it&nbsp;is</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line361"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;definitely&nbsp;in&nbsp;the&nbsp;DOM.</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line362"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>offsetParent</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span></span></span></span></div><div class="line"><a name="line363"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;if&nbsp;the&nbsp;element&nbsp;does&nbsp;not&nbsp;have&nbsp;an&nbsp;offsetParent&nbsp;it&nbsp;can&nbsp;mean&nbsp;the</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line364"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;element&nbsp;is&nbsp;either&nbsp;not&nbsp;in&nbsp;the&nbsp;dom&nbsp;or&nbsp;it&nbsp;is&nbsp;hidden.&nbsp;The&nbsp;next</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line365"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;step&nbsp;is&nbsp;to&nbsp;check&nbsp;to&nbsp;see&nbsp;if&nbsp;it&nbsp;can&nbsp;be&nbsp;found&nbsp;via&nbsp;getElementById</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line366"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>ownerDocument</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function dom js"><span>getElementById</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>id</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;dom</span></span></span></span></div><div class="line"><a name="line367"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace round js"><span>)</span></span></span></span></span></div><div class="line"><a name="line368"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace round js"><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line369"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line370"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line371"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>isUserEditable</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line372"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;me&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line373"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line374"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contentEditable&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>contentEditable</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line375"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line376"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;contentEditable&nbsp;will&nbsp;default&nbsp;to&nbsp;inherit&nbsp;if&nbsp;not&nbsp;specified,&nbsp;only&nbsp;check&nbsp;if&nbsp;the</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line377"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;attribute&nbsp;has&nbsp;been&nbsp;set&nbsp;or&nbsp;explicitly&nbsp;set&nbsp;to&nbsp;true</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line378"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;</span><span class="markup underline link http hyperlink"><span>http://html5doctor.com/the-contenteditable-attribute/</span></span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line379"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span><span>(</span></span><span>inputTags</span><span class="meta brace square js"><span>[</span></span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>tagName</span></span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span></span><span>nonEditableInputTypes</span><span class="meta brace square js"><span>[</span></span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>type</span></span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span></span></span></span></div><div class="line"><a name="line380"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword operator logical js"><span>!</span></span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>readOnly</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span></span><span class="variable other object js"><span>me</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>hasAttribute</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>disabled</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span></span></span></span></div><div class="line"><a name="line381"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>contentEditable&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;contentEditable&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>true</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line382"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language boolean true js"><span>true</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line383"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line384"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language boolean false js"><span>false</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line385"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line386"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line387"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>isVisible</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line388"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;me&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line389"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;el&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>parentNode</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line390"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isVisible&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getStyle</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>visibility</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>hidden</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span></span></span></span></div><div class="line"><a name="line391"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getStyle</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>display</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>none</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line392"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line393"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>for</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>&nbsp;</span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;isVisible&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;el&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="variable other object js"><span>el</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>nodeType</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;el&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>el</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>parentNode</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line394"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;css&nbsp;visibility&nbsp;is&nbsp;inherited&nbsp;so&nbsp;only&nbsp;need&nbsp;to&nbsp;check&nbsp;&#39;display&#39;&nbsp;on&nbsp;ancestors</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line395"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>fly</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>el</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>$</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getStyle</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>display</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>none</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line396"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;NOTE:&nbsp;we&nbsp;use&nbsp;a&nbsp;private&nbsp;fly&nbsp;since&nbsp;we&nbsp;are&nbsp;likely&nbsp;a&nbsp;fly&nbsp;ourselves</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line397"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isVisible&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant language boolean false js"><span>false</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line398"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line399"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line400"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line401"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;isVisible</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line402"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line403"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line404"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>hasAttribute</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>attribute</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line405"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line406"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line407"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line408"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>hasAttribute</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line409"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>hasAttribute</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>attribute</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line410"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line411"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;IE8m</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line412"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function dom js"><span>getAttribute</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>attribute</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>!=</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line413"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line414"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line415"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;ret</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line416"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line417"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line418"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>on</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>eventName</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>fn</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>scope</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>capture</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line419"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="variable other object js"><span>Element</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>on</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;eventName</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;fn</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;scope</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;capture</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line420"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line421"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line422"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line423"><a name="ST.Element-method-query"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@method</span></span><span>&nbsp;query</span></span></span></span></span></div><div class="line"><a name="line424"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Selects&nbsp;child&nbsp;nodes&nbsp;based&nbsp;on&nbsp;the&nbsp;passed&nbsp;CSS&nbsp;selector.</span></span></span></span></span></div><div class="line"><a name="line425"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Delegates&nbsp;to&nbsp;document.querySelectorAll.&nbsp;More&nbsp;information&nbsp;can&nbsp;be&nbsp;found&nbsp;at</span></span></span></span></span></div><div class="line"><a name="line426"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;[</span><span class="markup underline link http hyperlink"><span>http://www.w3.org/TR/css3-selectors/</span></span><span>](</span><span class="markup underline link http hyperlink"><span>http://www.w3.org/TR/css3-selectors/</span></span><span>)</span></span></span></span></span></div><div class="line"><a name="line427"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line428"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;All&nbsp;selectors,&nbsp;attribute&nbsp;filters&nbsp;and&nbsp;pseudos&nbsp;below&nbsp;can&nbsp;be&nbsp;combined&nbsp;infinitely</span></span></span></span></span></div><div class="line"><a name="line429"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;in&nbsp;any&nbsp;order.&nbsp;For&nbsp;example&nbsp;`div.foo:nth-child(odd)[@foo=bar].bar:first`&nbsp;would&nbsp;be</span></span></span></span></span></div><div class="line"><a name="line430"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;a&nbsp;perfectly&nbsp;valid&nbsp;selector.</span></span></span></span></span></div><div class="line"><a name="line431"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line432"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;##&nbsp;Element&nbsp;Selectors:</span></span></span></span></span></div><div class="line"><a name="line433"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line434"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;\*&nbsp;any&nbsp;element</span></span></span></span></span></div><div class="line"><a name="line435"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E&nbsp;an&nbsp;element&nbsp;with&nbsp;the&nbsp;tag&nbsp;E</span></span></span></span></span></div><div class="line"><a name="line436"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E&nbsp;F&nbsp;All&nbsp;descendant&nbsp;elements&nbsp;of&nbsp;E&nbsp;that&nbsp;have&nbsp;the&nbsp;tag&nbsp;F</span></span></span></span></span></div><div class="line"><a name="line437"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E&nbsp;&gt;&nbsp;F&nbsp;or&nbsp;E/F&nbsp;all&nbsp;direct&nbsp;children&nbsp;elements&nbsp;of&nbsp;E&nbsp;that&nbsp;have&nbsp;the&nbsp;tag&nbsp;F</span></span></span></span></span></div><div class="line"><a name="line438"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E&nbsp;+&nbsp;F&nbsp;all&nbsp;elements&nbsp;with&nbsp;the&nbsp;tag&nbsp;F&nbsp;that&nbsp;are&nbsp;immediately&nbsp;preceded&nbsp;by&nbsp;an&nbsp;element&nbsp;with&nbsp;the&nbsp;tag&nbsp;E</span></span></span></span></span></div><div class="line"><a name="line439"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E&nbsp;~&nbsp;F&nbsp;all&nbsp;elements&nbsp;with&nbsp;the&nbsp;tag&nbsp;F&nbsp;that&nbsp;are&nbsp;preceded&nbsp;by&nbsp;a&nbsp;sibling&nbsp;element&nbsp;with&nbsp;the&nbsp;tag&nbsp;E</span></span></span></span></span></div><div class="line"><a name="line440"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line441"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;##&nbsp;Attribute&nbsp;Selectors:</span></span></span></span></span></div><div class="line"><a name="line442"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line443"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;use&nbsp;of&nbsp;@&nbsp;and&nbsp;quotes&nbsp;are&nbsp;optional.&nbsp;For&nbsp;example,&nbsp;div[@foo=&#39;bar&#39;]&nbsp;is&nbsp;also&nbsp;a&nbsp;valid&nbsp;attribute&nbsp;selector.</span></span></span></span></span></div><div class="line"><a name="line444"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line445"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E[foo]&nbsp;has&nbsp;an&nbsp;attribute&nbsp;&quot;foo&quot;</span></span></span></span></span></div><div class="line"><a name="line446"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E[foo=bar]&nbsp;has&nbsp;an&nbsp;attribute&nbsp;&quot;foo&quot;&nbsp;that&nbsp;equals&nbsp;&quot;bar&quot;</span></span></span></span></span></div><div class="line"><a name="line447"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E[foo^=bar]&nbsp;has&nbsp;an&nbsp;attribute&nbsp;&quot;foo&quot;&nbsp;that&nbsp;starts&nbsp;with&nbsp;&quot;bar&quot;</span></span></span></span></span></div><div class="line"><a name="line448"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E[foo$=bar]&nbsp;has&nbsp;an&nbsp;attribute&nbsp;&quot;foo&quot;&nbsp;that&nbsp;ends&nbsp;with&nbsp;&quot;bar&quot;</span></span></span></span></span></div><div class="line"><a name="line449"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E[foo*=bar]&nbsp;has&nbsp;an&nbsp;attribute&nbsp;&quot;foo&quot;&nbsp;that&nbsp;contains&nbsp;the&nbsp;substring&nbsp;&quot;bar&quot;</span></span></span></span></span></div><div class="line"><a name="line450"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E[foo%=2]&nbsp;has&nbsp;an&nbsp;attribute&nbsp;&quot;foo&quot;&nbsp;that&nbsp;is&nbsp;evenly&nbsp;divisible&nbsp;by&nbsp;2</span></span></span></span></span></div><div class="line"><a name="line451"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E[foo!=bar]&nbsp;has&nbsp;an&nbsp;attribute&nbsp;&quot;foo&quot;&nbsp;that&nbsp;does&nbsp;not&nbsp;equal&nbsp;&quot;bar&quot;</span></span></span></span></span></div><div class="line"><a name="line452"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line453"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;##&nbsp;Pseudo&nbsp;Classes:</span></span></span></span></span></div><div class="line"><a name="line454"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line455"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:first-child&nbsp;E&nbsp;is&nbsp;the&nbsp;first&nbsp;child&nbsp;of&nbsp;its&nbsp;parent</span></span></span></span></span></div><div class="line"><a name="line456"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:last-child&nbsp;E&nbsp;is&nbsp;the&nbsp;last&nbsp;child&nbsp;of&nbsp;its&nbsp;parent</span></span></span></span></span></div><div class="line"><a name="line457"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:nth-child(n)&nbsp;E&nbsp;is&nbsp;the&nbsp;nth&nbsp;child&nbsp;of&nbsp;its&nbsp;parent&nbsp;(1&nbsp;based&nbsp;as&nbsp;per&nbsp;the&nbsp;spec)</span></span></span></span></span></div><div class="line"><a name="line458"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:nth-child(odd)&nbsp;E&nbsp;is&nbsp;an&nbsp;odd&nbsp;child&nbsp;of&nbsp;its&nbsp;parent</span></span></span></span></span></div><div class="line"><a name="line459"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:nth-child(even)&nbsp;E&nbsp;is&nbsp;an&nbsp;even&nbsp;child&nbsp;of&nbsp;its&nbsp;parent</span></span></span></span></span></div><div class="line"><a name="line460"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:only-child&nbsp;E&nbsp;is&nbsp;the&nbsp;only&nbsp;child&nbsp;of&nbsp;its&nbsp;parent</span></span></span></span></span></div><div class="line"><a name="line461"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:checked&nbsp;E&nbsp;is&nbsp;an&nbsp;element&nbsp;that&nbsp;is&nbsp;has&nbsp;a&nbsp;checked&nbsp;attribute&nbsp;that&nbsp;is&nbsp;true&nbsp;(e.g.&nbsp;a&nbsp;radio&nbsp;or&nbsp;checkbox)</span></span></span></span></span></div><div class="line"><a name="line462"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:first&nbsp;the&nbsp;first&nbsp;E&nbsp;in&nbsp;the&nbsp;resultset</span></span></span></span></span></div><div class="line"><a name="line463"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:last&nbsp;the&nbsp;last&nbsp;E&nbsp;in&nbsp;the&nbsp;resultset</span></span></span></span></span></div><div class="line"><a name="line464"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:nth(n)&nbsp;the&nbsp;nth&nbsp;E&nbsp;in&nbsp;the&nbsp;resultset&nbsp;(1&nbsp;based)</span></span></span></span></span></div><div class="line"><a name="line465"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:odd&nbsp;shortcut&nbsp;for&nbsp;:nth-child(odd)</span></span></span></span></span></div><div class="line"><a name="line466"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:even&nbsp;shortcut&nbsp;for&nbsp;:nth-child(even)</span></span></span></span></span></div><div class="line"><a name="line467"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:not(S)&nbsp;an&nbsp;E&nbsp;element&nbsp;that&nbsp;does&nbsp;not&nbsp;match&nbsp;simple&nbsp;selector&nbsp;S</span></span></span></span></span></div><div class="line"><a name="line468"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:has(S)&nbsp;an&nbsp;E&nbsp;element&nbsp;that&nbsp;has&nbsp;a&nbsp;descendant&nbsp;that&nbsp;matches&nbsp;simple&nbsp;selector&nbsp;S</span></span></span></span></span></div><div class="line"><a name="line469"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:next(S)&nbsp;an&nbsp;E&nbsp;element&nbsp;whose&nbsp;next&nbsp;sibling&nbsp;matches&nbsp;simple&nbsp;selector&nbsp;S</span></span></span></span></span></div><div class="line"><a name="line470"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:prev(S)&nbsp;an&nbsp;E&nbsp;element&nbsp;whose&nbsp;previous&nbsp;sibling&nbsp;matches&nbsp;simple&nbsp;selector&nbsp;S</span></span></span></span></span></div><div class="line"><a name="line471"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E:any(S1|S2|S2)&nbsp;an&nbsp;E&nbsp;element&nbsp;which&nbsp;matches&nbsp;any&nbsp;of&nbsp;the&nbsp;simple&nbsp;selectors&nbsp;S1,&nbsp;S2&nbsp;or&nbsp;S3//\\</span></span></span></span></span></div><div class="line"><a name="line472"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line473"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;##&nbsp;CSS&nbsp;Value&nbsp;Selectors:</span></span></span></span></span></div><div class="line"><a name="line474"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line475"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E{display=none}&nbsp;CSS&nbsp;value&nbsp;&quot;display&quot;&nbsp;that&nbsp;equals&nbsp;&quot;none&quot;</span></span></span></span></span></div><div class="line"><a name="line476"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E{display^=none}&nbsp;CSS&nbsp;value&nbsp;&quot;display&quot;&nbsp;that&nbsp;starts&nbsp;with&nbsp;&quot;none&quot;</span></span></span></span></span></div><div class="line"><a name="line477"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E{display$=none}&nbsp;CSS&nbsp;value&nbsp;&quot;display&quot;&nbsp;that&nbsp;ends&nbsp;with&nbsp;&quot;none&quot;</span></span></span></span></span></div><div class="line"><a name="line478"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E{display*=none}&nbsp;CSS&nbsp;value&nbsp;&quot;display&quot;&nbsp;that&nbsp;contains&nbsp;the&nbsp;substring&nbsp;&quot;none&quot;</span></span></span></span></span></div><div class="line"><a name="line479"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E{display%=2}&nbsp;CSS&nbsp;value&nbsp;&quot;display&quot;&nbsp;that&nbsp;is&nbsp;evenly&nbsp;divisible&nbsp;by&nbsp;2</span></span></span></span></span></div><div class="line"><a name="line480"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;*&nbsp;E{display!=none}&nbsp;CSS&nbsp;value&nbsp;&quot;display&quot;&nbsp;that&nbsp;does&nbsp;not&nbsp;equal&nbsp;&quot;none&quot;</span></span></span></span></span></div><div class="line"><a name="line481"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></span></span></span></div><div class="line"><a name="line482"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;</span><span class="other meta jsdoc"><span class="entity name type instance jsdoc"><span>{String}</span></span><span>&nbsp;</span><span class="variable other jsdoc"><span>selector</span></span><span>&nbsp;</span><span class="other description jsdoc"><span>The&nbsp;CSS&nbsp;selector.</span></span></span></span></span></span></span></div><div class="line"><a name="line483"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{Boolean}&nbsp;[asDom=false]&nbsp;`false`&nbsp;to&nbsp;return&nbsp;an&nbsp;array&nbsp;of&nbsp;ST.Element</span></span></span></span></span></div><div class="line"><a name="line484"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;single&nbsp;(private)</span></span></span></span></span></div><div class="line"><a name="line485"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{HTMLElement[]/ST.Element[]}&nbsp;An&nbsp;Array&nbsp;of&nbsp;elements&nbsp;(</span></span></span></span></span></div><div class="line"><a name="line486"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;HTMLElement&nbsp;or&nbsp;ST.Element&nbsp;if&nbsp;`asDom`&nbsp;is&nbsp;`false`)&nbsp;that&nbsp;match&nbsp;the&nbsp;selector.&nbsp;&nbsp;</span></span></span></span></span></div><div class="line"><a name="line487"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;there&nbsp;are&nbsp;no&nbsp;matches,&nbsp;an&nbsp;empty&nbsp;Array&nbsp;is&nbsp;returned.</span></span></span></span></span></div><div class="line"><a name="line488"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line489"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>query</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>selector</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>asDom</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>single</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line490"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line491"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;results</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;len</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;node</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;nodes</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;i</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line492"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line493"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span>dom</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line494"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line495"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line496"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line497"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>single</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line498"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;if&nbsp;single,&nbsp;only&nbsp;run&nbsp;querySelector</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line499"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;node&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>querySelector</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>selector</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line500"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;asDom&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;node&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>get</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>node</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line501"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line502"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;if&nbsp;not&nbsp;single,&nbsp;run&nbsp;the&nbsp;full&nbsp;QSA</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line503"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;results&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace square js"><span>[</span><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line504"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nodes&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>querySelectorAll</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>selector</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line505"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line506"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>for</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>i&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;len&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>nodes</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>length</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;i&nbsp;</span><span class="keyword operator comparison js"><span>&lt;</span></span><span>&nbsp;len</span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;i</span><span class="keyword operator increment js"><span>++</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line507"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;node&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;nodes</span><span class="meta brace square js"><span>[</span></span><span>i</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line508"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>results</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>push</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>asDom&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;node&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>get</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>node</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line509"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line510"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line511"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;results</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line512"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line513"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line514"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line515"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line516"><a name="ST.Element-method-down"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@method</span></span><span>&nbsp;down</span></span></span></span></span></div><div class="line"><a name="line517"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Selects&nbsp;a&nbsp;single&nbsp;child&nbsp;at&nbsp;any&nbsp;depth&nbsp;below&nbsp;this&nbsp;element&nbsp;based&nbsp;on&nbsp;the&nbsp;passed&nbsp;CSS&nbsp;selector&nbsp;(the&nbsp;selector&nbsp;should&nbsp;not&nbsp;contain&nbsp;an&nbsp;id).</span></span></span></span></span></div><div class="line"><a name="line518"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;</span><span class="other meta jsdoc"><span class="entity name type instance jsdoc"><span>{String}</span></span><span>&nbsp;</span><span class="variable other jsdoc"><span>selector</span></span><span>&nbsp;</span><span class="other description jsdoc"><span>The&nbsp;CSS&nbsp;selector</span></span></span></span></span></span></span></div><div class="line"><a name="line519"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{Boolean}&nbsp;[asDom=false]&nbsp;`true`&nbsp;to&nbsp;return&nbsp;the&nbsp;DOM&nbsp;node&nbsp;instead&nbsp;of&nbsp;ST.Element</span></span></span></span></span></div><div class="line"><a name="line520"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{HTMLElement/ST.Element}&nbsp;The&nbsp;child&nbsp;ST.Element&nbsp;(or&nbsp;DOM&nbsp;node&nbsp;if&nbsp;`asDom`&nbsp;is&nbsp;`true`)</span></span></span></span></span></div><div class="line"><a name="line521"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line522"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>down</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>selector</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>asDom</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line523"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>query</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>selector</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;asDom</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="constant language boolean true js"><span>true</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line524"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line525"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line526"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line527"><a name="ST.Element-method-child"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@method</span></span><span>&nbsp;child</span></span></span></span></span></div><div class="line"><a name="line528"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Selects&nbsp;a&nbsp;single&nbsp;*direct*&nbsp;child&nbsp;based&nbsp;on&nbsp;the&nbsp;passed&nbsp;CSS&nbsp;selector&nbsp;(the&nbsp;selector&nbsp;should&nbsp;not&nbsp;contain&nbsp;an&nbsp;id).</span></span></span></span></span></div><div class="line"><a name="line529"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;</span><span class="other meta jsdoc"><span class="entity name type instance jsdoc"><span>{String}</span></span><span>&nbsp;</span><span class="variable other jsdoc"><span>selector</span></span><span>&nbsp;</span><span class="other description jsdoc"><span>The&nbsp;CSS&nbsp;selector.</span></span></span></span></span></span></span></div><div class="line"><a name="line530"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{Boolean}&nbsp;[asDom=false]&nbsp;`true`&nbsp;to&nbsp;return&nbsp;the&nbsp;DOM&nbsp;node&nbsp;instead&nbsp;of&nbsp;ST.Element.</span></span></span></span></span></div><div class="line"><a name="line531"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{HTMLElement/ST.Element}&nbsp;The&nbsp;child&nbsp;ST.Element&nbsp;(or&nbsp;DOM&nbsp;node&nbsp;if&nbsp;`asDom`&nbsp;is&nbsp;`true`)</span></span></span></span></span></div><div class="line"><a name="line532"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line533"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>child</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>selector</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>asDom</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line534"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;me&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line535"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;results&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>query</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>selector</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="constant language boolean true js"><span>true</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line536"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;len&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>results</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>length</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line537"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;node</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line538"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line539"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>for</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>i</span><span class="keyword operator assignment js"><span>=</span></span><span class="constant numeric decimal js"><span>0</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;i</span><span class="keyword operator comparison js"><span>&lt;</span></span><span>len</span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;i</span><span class="keyword operator increment js"><span>++</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line540"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;node&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;results</span><span class="meta brace square js"><span>[</span></span><span>i</span><span class="meta brace square js"><span>]</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line541"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;if&nbsp;the&nbsp;parentNode&nbsp;of&nbsp;this&nbsp;node&nbsp;matches&nbsp;our&nbsp;starting&nbsp;context,&nbsp;</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line542"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;this&nbsp;is&nbsp;a&nbsp;match&nbsp;and&nbsp;we&nbsp;can&nbsp;stop&nbsp;checking</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line543"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>node</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>parentNode</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line544"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;asDom&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;node&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>get</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>node</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line545"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line546"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line547"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line548"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line549"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line550"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line551"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line552"><a name="ST.Element-method-up"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@method</span></span><span>&nbsp;up</span></span></span></span></span></div><div class="line"><a name="line553"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Walks&nbsp;up&nbsp;the&nbsp;dom&nbsp;looking&nbsp;for&nbsp;a&nbsp;parent&nbsp;node&nbsp;that&nbsp;matches&nbsp;the&nbsp;passed&nbsp;simple&nbsp;selector&nbsp;(e.g.&nbsp;&#39;div.some-class&#39;&nbsp;or&nbsp;&#39;span:first-child&#39;).</span></span></span></span></span></div><div class="line"><a name="line554"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;is&nbsp;a&nbsp;shortcut&nbsp;for&nbsp;findParentNode()&nbsp;that&nbsp;always&nbsp;returns&nbsp;an&nbsp;ST.Element.</span></span></span></span></span></div><div class="line"><a name="line555"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;</span><span class="other meta jsdoc"><span class="entity name type instance jsdoc"><span>{String}</span></span><span>&nbsp;</span><span class="variable other jsdoc"><span>selector</span></span><span>&nbsp;</span><span class="other description jsdoc"><span>The&nbsp;simple&nbsp;selector&nbsp;to&nbsp;test.</span></span></span></span></span></span></span></div><div class="line"><a name="line556"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{Number/String/HTMLElement/ST.Element}&nbsp;[limit]</span></span></span></span></span></div><div class="line"><a name="line557"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;max&nbsp;depth&nbsp;to&nbsp;search&nbsp;as&nbsp;a&nbsp;number&nbsp;or&nbsp;an&nbsp;element&nbsp;that&nbsp;causes&nbsp;the&nbsp;upward</span></span></span></span></span></div><div class="line"><a name="line558"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;traversal&nbsp;to&nbsp;stop&nbsp;and&nbsp;is&nbsp;**not**&nbsp;considered&nbsp;for&nbsp;inclusion&nbsp;as&nbsp;the&nbsp;result.</span></span></span></span></span></div><div class="line"><a name="line559"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;(defaults&nbsp;to&nbsp;50&nbsp;||&nbsp;document.documentElement)</span></span></span></span></span></div><div class="line"><a name="line560"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{Boolean}&nbsp;[asDom=false]&nbsp;True&nbsp;to&nbsp;return&nbsp;the&nbsp;DOM&nbsp;node&nbsp;instead&nbsp;of&nbsp;ST.Element</span></span></span></span></span></div><div class="line"><a name="line561"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{ST.Element/HTMLElement}&nbsp;The&nbsp;matching&nbsp;DOM&nbsp;node&nbsp;(or&nbsp;DOM&nbsp;node&nbsp;if&nbsp;`asDom`&nbsp;is&nbsp;`true`)</span></span></span></span></span></div><div class="line"><a name="line562"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line563"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>up</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>selector</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>asDom</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>limit</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line564"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>findParentNode</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>selector</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;asDom</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;limit</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line565"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line566"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line567"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line568"><a name="ST.Element-method-is"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@method</span></span><span>&nbsp;is</span></span></span></span></span></div><div class="line"><a name="line569"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Returns&nbsp;`true`&nbsp;if&nbsp;this&nbsp;element&nbsp;matches&nbsp;the&nbsp;passed&nbsp;simple&nbsp;selector</span></span></span></span></span></div><div class="line"><a name="line570"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;(e.g.&nbsp;&#39;div.some-class&#39;&nbsp;or&nbsp;&#39;span:first-child&#39;).</span></span></span></span></span></div><div class="line"><a name="line571"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{String/Function}&nbsp;selector&nbsp;The&nbsp;simple&nbsp;selector&nbsp;to&nbsp;test&nbsp;or&nbsp;a&nbsp;function&nbsp;which&nbsp;is&nbsp;passed</span></span></span></span></span></div><div class="line"><a name="line572"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;candidate&nbsp;nodes,&nbsp;and&nbsp;should&nbsp;return&nbsp;`true`&nbsp;for&nbsp;nodes&nbsp;which&nbsp;match.</span></span></span></span></span></div><div class="line"><a name="line573"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{Boolean}&nbsp;`true`&nbsp;if&nbsp;this&nbsp;element&nbsp;matches&nbsp;the&nbsp;selector,&nbsp;else&nbsp;`false`.</span></span></span></span></span></div><div class="line"><a name="line574"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line575"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>is</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>selector</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line576"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;matchesSelector&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>matchesSelection</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line577"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dom&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line578"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line579"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>matchesSelector</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line580"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;dom</span><span class="meta brace square js"><span>[</span></span><span>matchesSelector</span><span class="meta brace square js"><span>]</span></span><span class="meta brace round js"><span>(</span></span><span>selector</span><span class="meta brace round js"><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line581"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line582"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;elems&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>parentNode</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>querySelectorAll</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>selector</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line583"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;count&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>elems</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>length</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line584"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line585"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>for</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="storage type var js"><span>var</span></span><span>&nbsp;i&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;i&nbsp;</span><span class="keyword operator comparison js"><span>&lt;</span></span><span>&nbsp;count</span><span class="punctuation terminator statement js"><span>;</span></span><span>&nbsp;i</span><span class="keyword operator increment js"><span>++</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line586"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>elems</span><span class="meta brace square js"><span>[</span></span><span>i</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;dom</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line587"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language boolean true js"><span>true</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line588"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line589"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line590"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language boolean false js"><span>false</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line591"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line592"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line593"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></span></span></div><div class="line"><a name="line594"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line595"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@private</span></span></span></span></span></span></div><div class="line"><a name="line596"><a name="ST.Element-method-findParentNode"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line597"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>findParentNode</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>selector</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>asDom</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>limit</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line598"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;p&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>fly</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>dom</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>parentNode</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line599"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;p&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;</span><span class="variable other object js"><span>p</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>findParent</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>selector</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;asDom</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;limit</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line600"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line601"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line602"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line603"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@private</span></span></span></span></span></span></div><div class="line"><a name="line604"><a name="ST.Element-method-findParent"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line605"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>findParent</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>selector</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>asDom</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>limit</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line606"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;me&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line607"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>me</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line608"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;topmost&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class js"><span>document</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>documentElement</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line609"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;depth&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line610"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line611"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>limit&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;limit&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>0</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line612"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator typeof js"><span>typeof</span></span><span>&nbsp;limit&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>number</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line613"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;topmost&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getDom</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>limit</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line614"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;limit&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class js"><span>Number</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>MAX_VALUE</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line615"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line616"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line617"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;No&nbsp;limit&nbsp;passed,&nbsp;default&nbsp;to&nbsp;50</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line618"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;limit&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>50</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line619"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line620"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line621"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>while</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>target&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="variable other object js"><span>target</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>nodeType</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="constant numeric decimal js"><span>1</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;depth&nbsp;</span><span class="keyword operator comparison js"><span>&lt;</span></span><span>&nbsp;limit&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;target&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;topmost</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line622"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>fly</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>target</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>is</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>selector</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line623"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span></span><span>asDom&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>get</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>target</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;target</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line624"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line625"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;depth</span><span class="keyword operator increment js"><span>++</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line626"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>target</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>parentNode</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line627"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line628"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line629"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line630"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line631"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line632"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@private</span></span></span></span></span></span></div><div class="line"><a name="line633"><a name="ST.Element-method-matchesSelection"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line634"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>matchesSelection</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line635"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;el&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class js"><span>document</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>documentElement</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line636"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;w3&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>matches</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line637"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wk&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>webkitMatchesSelector</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line638"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ms&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>msMatchesSelector</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line639"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mz&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>mozMatchesSelector</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line640"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line641"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;el</span><span class="meta brace square js"><span>[</span></span><span>w3</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;w3&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;el</span><span class="meta brace square js"><span>[</span></span><span>wk</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;wk&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;el</span><span class="meta brace square js"><span>[</span></span><span>ms</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;ms&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;el</span><span class="meta brace square js"><span>[</span></span><span>mz</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;mz&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line642"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line643"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line644"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;statics</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line645"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>getViewportScrollElement</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line646"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;standard&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>$standardScrollElement</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line647"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;el&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>doc</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>scrollingElement</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line648"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iframe</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;frameDoc</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;el</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line649"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line650"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>el</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line651"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;el</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line652"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line653"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line654"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>standard&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="constant language js"><span>undefined</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line655"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iframe&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class js"><span>document</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function dom js"><span>createElement</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>iframe</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line656"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line657"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>iframe</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>style</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>height</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>1px</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line658"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="support class js"><span>document</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>body</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function dom js"><span>appendChild</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>iframe</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line659"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;frameDoc&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>iframe</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other object property js"><span>contentWindow</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>document</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line660"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>frameDoc</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function dom js"><span>write</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>&lt;!DOCTYPE&nbsp;html&gt;&lt;div&nbsp;style=&quot;height:9999em&quot;&gt;x&lt;/div&gt;</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line661"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>frameDoc</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function dom js"><span>close</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line662"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;standard&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>frameDoc</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>documentElement</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>scrollHeight</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>&gt;</span></span><span>&nbsp;</span><span class="variable other object js"><span>frameDoc</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>body</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>scrollHeight</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line663"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>iframe</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>parentNode</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>removeChild</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>iframe</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line664"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line665"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable language js"><span>this</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>$standardScrollElement</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;standard</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line666"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line667"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;standard&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;docEl&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;body</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line668"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line669"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line670"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>getViewportSize</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line671"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line672"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="support class js"><span>window</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>innerHeight</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="variable other object js"><span>docEl</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>clientHeight</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line673"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;</span><span class="support class js"><span>window</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant js"><span>innerWidth</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="variable other object js"><span>docEl</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>clientWidth</span></span></span></span></span></div><div class="line"><a name="line674"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line675"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line676"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line677"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>on</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>el</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>eventName</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>fn</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>scope</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>capture</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line678"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;ieEventModel&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>el</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>attachEvent</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="support class js"><span>navigator</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>msMaxTouchPoints</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>==</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="meta brace round js"><span>)</span><span>)</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;IE8/9</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line679"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function js"><span class="entity name function js"><span>wrap</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line680"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="variable other object js"><span>fn</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>apply</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>scope</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable language js"><span>arguments</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line681"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line682"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line683"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fn&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator typeof js"><span>typeof</span></span><span>&nbsp;fn&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>string</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="keyword operator js"><span>?</span></span><span>&nbsp;scope</span><span class="meta brace square js"><span>[</span></span><span>fn</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator js"><span>:</span></span><span>&nbsp;fn</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line684"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line685"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>ieEventModel</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line686"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>el</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>attachEvent</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>on</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator js"><span>+</span></span><span>&nbsp;eventName</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;wrap</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line687"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line688"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>el</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>addEventListener</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>eventName</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;wrap</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span><span>!</span></span><span>capture</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line689"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line690"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line691"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line692"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta function json js"><span class="entity name function js"><span>destroy</span></span><span class="keyword operator assignment js"><span>:</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line693"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>ieEventModel</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line694"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>el</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function js"><span>detachEvent</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>on</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span>&nbsp;</span><span class="keyword operator js"><span>+</span></span><span>&nbsp;eventName</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;wrap</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line695"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span>&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line696"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>el</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>removeEventListener</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>eventName</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;wrap</span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>!</span><span>!</span></span><span>capture</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line697"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line698"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wrap&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line699"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line700"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line701"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line702"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line703"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line704"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="meta delimiter object comma js"><span>,</span></span></span></span></span></div><div class="line"><a name="line705"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="meta function js"><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>Element</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line706"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;flies&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="punctuation section scope begin js"><span>{</span></span><span class="punctuation section scope end js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line707"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line708"><a name="ST-method-getDom"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line709"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Given&nbsp;one&nbsp;of&nbsp;the&nbsp;various&nbsp;ways&nbsp;to&nbsp;identify&nbsp;a&nbsp;DOM&nbsp;node,&nbsp;this&nbsp;method&nbsp;returns&nbsp;the</span></span></span></span></span></div><div class="line"><a name="line710"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;DOM&nbsp;node&nbsp;or&nbsp;`null`.</span></span></span></span></span></div><div class="line"><a name="line711"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{String/HTMLElement/ST.Element/Ext.Element}&nbsp;domNode</span></span></span></span></span></div><div class="line"><a name="line712"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{HTMLElement}</span></span></span></span></span></div><div class="line"><a name="line713"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@method</span></span><span>&nbsp;getDom</span></span></span></span></span></div><div class="line"><a name="line714"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@member</span></span><span>&nbsp;ST</span></span></span></span></span></div><div class="line"><a name="line715"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line716"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta function js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getDom</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>domNode</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line717"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span>domNode</span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line718"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line719"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line720"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line721"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;This&nbsp;piece&nbsp;is&nbsp;aligned&nbsp;with&nbsp;Ext.getDom()&nbsp;except&nbsp;that&nbsp;we&nbsp;check&nbsp;for&nbsp;nodeType</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line722"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;to&nbsp;ensure&nbsp;we&nbsp;are&nbsp;not&nbsp;given&nbsp;truthy&nbsp;garbage.</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line723"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line724"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator typeof js"><span>typeof</span></span><span>&nbsp;domNode&nbsp;</span><span class="keyword operator comparison js"><span>===</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>string</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line725"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;domNode&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="support class js"><span>document</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="support function dom js"><span>getElementById</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>domNode</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line726"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line727"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="variable other object js"><span>domNode</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line728"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;May&nbsp;be&nbsp;an&nbsp;ST.Element&nbsp;or&nbsp;an&nbsp;Ext.Element,&nbsp;either&nbsp;way,&nbsp;just&nbsp;use&nbsp;the&nbsp;&quot;dom&quot;</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line729"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation whitespace comment leading js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span class="comment line double-slash js"><span class="punctuation definition comment js"><span>//</span></span><span>&nbsp;value.&nbsp;This&nbsp;ensures&nbsp;an&nbsp;ST.Element&nbsp;is&nbsp;returned.</span><span>&nbsp;</span></span></span></span></span></div><div class="line"><a name="line730"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;domNode&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="variable other object js"><span>domNode</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line731"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line732"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>else</span></span><span>&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>domNode&nbsp;</span><span class="keyword operator comparison js"><span>!=</span></span><span>&nbsp;</span><span class="support class js"><span>window</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>&amp;&amp;</span></span><span>&nbsp;</span><span class="keyword operator typeof js"><span>typeof</span></span><span>&nbsp;</span><span class="variable other object js"><span>domNode</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="support constant dom js"><span>nodeType</span></span><span>&nbsp;</span><span class="keyword operator comparison js"><span>!==</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>number</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="meta brace round js"><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line733"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line734"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line735"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line736"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;domNode</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line737"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line738"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line739"><a name="ST-method-fly"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line740"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Given&nbsp;one&nbsp;of&nbsp;the&nbsp;various&nbsp;ways&nbsp;to&nbsp;identify&nbsp;a&nbsp;DOM&nbsp;node,&nbsp;this&nbsp;method&nbsp;returns&nbsp;a</span></span></span></span></span></div><div class="line"><a name="line741"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;temporary,&nbsp;fly-weight&nbsp;`ST.Element`&nbsp;or&nbsp;`null`.&nbsp;Instances&nbsp;returned&nbsp;by&nbsp;this</span></span></span></span></span></div><div class="line"><a name="line742"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;method&nbsp;should&nbsp;be&nbsp;used&nbsp;briefly&nbsp;to&nbsp;call&nbsp;the&nbsp;methods&nbsp;of&nbsp;the&nbsp;`ST.Element`&nbsp;and&nbsp;then</span></span></span></span></span></div><div class="line"><a name="line743"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;ignored&nbsp;since&nbsp;the&nbsp;instance&nbsp;will&nbsp;be&nbsp;re-used&nbsp;by&nbsp;future&nbsp;calls&nbsp;to&nbsp;this&nbsp;method.</span></span></span></span></span></div><div class="line"><a name="line744"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{String/HTMLElement/ST.Element/Ext.Element}&nbsp;domNode</span></span></span></span></span></div><div class="line"><a name="line745"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{String}&nbsp;[flyName=&quot;fly&quot;]&nbsp;An&nbsp;optional&nbsp;name&nbsp;for&nbsp;the&nbsp;fly.&nbsp;Passing&nbsp;a&nbsp;custom</span></span></span></span></span></div><div class="line"><a name="line746"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;name&nbsp;can&nbsp;be&nbsp;used&nbsp;to&nbsp;control&nbsp;the&nbsp;scope&nbsp;of&nbsp;re-use&nbsp;of&nbsp;the&nbsp;returned&nbsp;instance.</span></span></span></span></span></div><div class="line"><a name="line747"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{ST.Element}</span></span></span></span></span></div><div class="line"><a name="line748"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@method</span></span><span>&nbsp;fly</span></span></span></span></span></div><div class="line"><a name="line749"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@member</span></span><span>&nbsp;ST</span></span></span></span></span></div><div class="line"><a name="line750"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line751"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta function js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>fly</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>domNode</span></span><span class="meta delimiter object comma js"><span>,</span></span><span>&nbsp;</span><span class="variable parameter function js"><span>flyName</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line752"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span class="meta brace round js"><span>(</span></span><span>domNode&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getDom</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>domNode</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta brace round js"><span>)</span><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line753"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line754"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line755"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line756"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flyName&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;flyName&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="string quoted single js"><span class="punctuation definition string begin js"><span>&#39;</span></span><span>fly</span><span class="punctuation definition string end js"><span>&#39;</span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line757"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line758"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="storage type var js"><span>var</span></span><span>&nbsp;fly&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;flies</span><span class="meta brace square js"><span>[</span></span><span>flyName</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator logical js"><span>||</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span>flies</span><span class="meta brace square js"><span>[</span></span><span>flyName</span><span class="meta brace square js"><span>]</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="meta class instance constructor"><span class="keyword operator new js"><span>new</span></span><span>&nbsp;</span><span class="entity name type instance js"><span>Element</span></span></span><span class="meta brace round js"><span>(</span><span>)</span><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line759"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line760"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="variable other object js"><span>fly</span></span><span class="meta delimiter property period js"><span>.</span></span><span class="variable other property js"><span>dom</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;domNode</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line761"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;fly</span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line762"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line763"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line764"><a name="ST-method-get"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="comment block documentation js"><span class="punctuation definition comment js"><span>/**</span></span></span></span></span></span></div><div class="line"><a name="line765"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Given&nbsp;one&nbsp;of&nbsp;the&nbsp;various&nbsp;ways&nbsp;to&nbsp;identify&nbsp;a&nbsp;DOM&nbsp;node,&nbsp;this&nbsp;method&nbsp;returns&nbsp;a</span></span></span></span></span></div><div class="line"><a name="line766"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;temporary,&nbsp;fly-weight&nbsp;`ST.Element`&nbsp;or&nbsp;`null`.&nbsp;Each&nbsp;call&nbsp;to&nbsp;this&nbsp;method&nbsp;returns</span></span></span></span></span></div><div class="line"><a name="line767"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;a&nbsp;new&nbsp;`ST.Element`&nbsp;instance.&nbsp;Unlike&nbsp;`Ext.get()`&nbsp;this&nbsp;method&nbsp;does&nbsp;not&nbsp;maintain&nbsp;an</span></span></span></span></span></div><div class="line"><a name="line768"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;element&nbsp;cache&nbsp;nor&nbsp;does&nbsp;it&nbsp;assign&nbsp;an&nbsp;`id`&nbsp;to&nbsp;the&nbsp;element.&nbsp;In&nbsp;other&nbsp;words,&nbsp;this</span></span></span></span></span></div><div class="line"><a name="line769"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;method&nbsp;is&nbsp;equivalent&nbsp;to&nbsp;`new&nbsp;ST.Element()`.</span></span></span></span></span></div><div class="line"><a name="line770"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@param</span></span><span>&nbsp;{String/HTMLElement/ST.Element/Ext.Element}&nbsp;domNode</span></span></span></span></span></div><div class="line"><a name="line771"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@return</span></span><span>&nbsp;{ST.Element}</span></span></span></span></span></div><div class="line"><a name="line772"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@method</span></span><span>&nbsp;get</span></span></span></span></span></div><div class="line"><a name="line773"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="storage type class jsdoc"><span>@member</span></span><span>&nbsp;ST</span></span></span></span></span></div><div class="line"><a name="line774"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="comment block documentation js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition comment js"><span>*/</span></span></span></span></span></span></div><div class="line"><a name="line775"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta function js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>get</span></span><span>&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="storage type function js"><span>function</span></span><span>&nbsp;</span><span class="meta parameters js"><span class="punctuation definition parameters begin bracket round js"><span>(</span></span><span class="variable parameter function js"><span>domNode</span></span><span class="punctuation definition parameters end bracket round js"><span>)</span></span></span></span><span>&nbsp;</span><span class="punctuation definition function body begin bracket curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line776"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>if</span></span><span>&nbsp;</span><span class="meta brace round js"><span>(</span></span><span class="keyword operator logical js"><span>!</span></span><span class="meta brace round js"><span>(</span></span><span>domNode&nbsp;</span><span class="keyword operator assignment js"><span>=</span></span><span>&nbsp;</span><span class="constant other object js"><span>ST</span></span><span class="meta method-call js"><span class="meta delimiter method period js"><span>.</span></span><span class="entity name function js"><span>getDom</span></span><span class="meta arguments js"><span class="punctuation definition arguments begin bracket round js"><span>(</span></span><span>domNode</span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="meta brace round js"><span>)</span><span>)</span></span><span>&nbsp;</span><span class="meta brace curly js"><span>{</span></span></span></span></span></div><div class="line"><a name="line777"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="constant language null js"><span>null</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line778"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="meta brace curly js"><span>}</span></span></span></span></span></div><div class="line"><a name="line779"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;</span></span></span></span></div><div class="line"><a name="line780"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="keyword control js"><span>return</span></span><span>&nbsp;</span><span class="meta class instance constructor"><span class="keyword operator new js"><span>new</span></span><span>&nbsp;</span><span class="entity name type instance js"><span>Element</span></span></span><span class="meta brace round js"><span>(</span></span><span>domNode</span><span class="meta brace round js"><span>)</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line781"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="punctuation terminator statement js"><span>;</span></span></span></span></span></div><div class="line"><a name="line782"><span class="source js"><span class="meta method-call js"><span class="meta arguments js"><span class="punctuation definition function body end bracket curly js"><span>}</span></span><span class="punctuation definition arguments end bracket round js"><span>)</span></span></span></span><span class="punctuation terminator statement js"><span>;</span></span></span></div></pre>
</body>
<script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
                (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-1396058-28', 'auto');
    ga('send', 'pageview');

</script>
</html>
